// MailStatDlg.h : header file
//

#pragma once

#include "PEProtocol.h"

#include "BtnST.h"
#include "TextProgressCtrl.h"
#include "afxcmn.h"
#include "afxdtctl.h"
#include "UIContainer.h"


// CMailStatDlg dialog
class CMailStatDlg : public CDialog
{
// Construction
public:
	CMailStatDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_MAILSTAT_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()

	HBRUSH m_hDialogBrush;
	HBRUSH m_hTitleBarBrush;

	BOOL PtInClientRect(CPoint p);

public:
	afx_msg void OnBnClickedBtnAbout();
	afx_msg void OnBnClickedButtonClose();
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	afx_msg LRESULT OnNcHitTest(CPoint point);
	CTextProgressCtrl m_StatProgress;

	CButtonST m_btnClose;
	CButtonST m_btnMin;
	
	CButtonST m_btnAbout;
	CButtonST m_btnStart;
	CButtonST m_btnExport;

	afx_msg void OnBnClickedButtonMin();
	afx_msg void OnBnClickedCheckTimeRange();
	afx_msg void OnBnClickedBtnStartStat();
	CDateTimeCtrl m_StartTimePicker;
	CDateTimeCtrl m_EndTimePicker;
protected:
	virtual BOOL OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult);

	int m_iFolderType;
	void SetProgress(int iTotal,int iCur);

	int m_iStopStat;

	CUIContainer *m_pUIContainer;

public:
	afx_msg void OnBnClickedRadioWhole();
	afx_msg void OnBnClickedRadioThisMonth();
	afx_msg void OnBnClickedRadioThisWeek();
	afx_msg void OnBnClickedRadioToday();
	afx_msg void OnBnClickedBtnExport();
};
